package com.gzhryc.pay.adaptation.weixin.msg.normal;

import com.gzhryc.pay.adaptation.weixin.msg.GoodsDetailItem;
import com.gzhryc.pay.adaptation.weixin.msg.PayerItem;

import java.io.Serializable;
import java.util.List;

public class WXPayNormalPayRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    private String appid;       //应用ID，必须
    private String mchid;       //直连商户号，必须
    private String description; //商品描述，必须
    private String out_trade_no; //商户订单号，必须
    private String time_expire; //交易结束时间,遵循rfc3339标准格式，格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE
    private String attach;      //附加数据
    private String notify_url;  //通知地址，必须
    private String goods_tag;   //订单优惠标记
    private AmountItem amount;  //订单金额，必须
    private PayerItem payer;    //支付者，必须
    private DetailItem detail;      //优惠功能
    private SceneInfoItem scene_info;   //支付场景描述
    private SettleInfoItem settle_info;     //结算信息

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getMchid() {
        return mchid;
    }

    public void setMchid(String mchid) {
        this.mchid = mchid;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getOut_trade_no() {
        return out_trade_no;
    }

    public void setOut_trade_no(String out_trade_no) {
        this.out_trade_no = out_trade_no;
    }

    public String getTime_expire() {
        return time_expire;
    }

    public void setTime_expire(String time_expire) {
        this.time_expire = time_expire;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getNotify_url() {
        return notify_url;
    }

    public void setNotify_url(String notify_url) {
        this.notify_url = notify_url;
    }

    public String getGoods_tag() {
        return goods_tag;
    }

    public void setGoods_tag(String goods_tag) {
        this.goods_tag = goods_tag;
    }

    public AmountItem getAmount() {
        return amount;
    }

    public void setAmount(AmountItem amount) {
        this.amount = amount;
    }

    public PayerItem getPayer() {
        return payer;
    }

    public void setPayer(PayerItem payer) {
        this.payer = payer;
    }

    public DetailItem getDetail() {
        return detail;
    }

    public void setDetail(DetailItem detail) {
        this.detail = detail;
    }

    public SceneInfoItem getScene_info() {
        return scene_info;
    }

    public void setScene_info(SceneInfoItem scene_info) {
        this.scene_info = scene_info;
    }

    public SettleInfoItem getSettle_info() {
        return settle_info;
    }

    public void setSettle_info(SettleInfoItem settle_info) {
        this.settle_info = settle_info;
    }

    public static class AmountItem implements Serializable {

        private static final long serialVersionUID = 1L;

        private Integer total;
        private String currency = "CNY"; // 货币类型,CNY：人民币，境内商户号仅支持人民币

        public Integer getTotal() {
            return total;
        }

        public void setTotal(Integer total) {
            this.total = total;
        }

        public String getCurrency() {
            return currency;
        }

        public void setCurrency(String currency) {
            this.currency = currency;
        }
    }

    public static class DetailItem implements Serializable {

        private static final long serialVersionUID = 1L;

        private Integer cost_price;     //订单原价
        private String invoice_id;      //商品小票ID
        private List<GoodsDetailItem> goods_detail;  //单品列表信息

        public Integer getCost_price() {
            return cost_price;
        }

        public void setCost_price(Integer cost_price) {
            this.cost_price = cost_price;
        }

        public String getInvoice_id() {
            return invoice_id;
        }

        public void setInvoice_id(String invoice_id) {
            this.invoice_id = invoice_id;
        }

        public List<GoodsDetailItem> getGoods_detail() {
            return goods_detail;
        }

        public void setGoods_detail(List<GoodsDetailItem> goods_detail) {
            this.goods_detail = goods_detail;
        }
    }

    public static class SceneInfoItem implements Serializable {

        private static final long serialVersionUID = 1L;

        private String payer_client_ip;  //用户的客户端IP，支持IPv4和IPv6两种格式的IP地址，必须
        private String device_id;       //商户端设备号（门店号或收银设备ID）
        private StoreInfoItem store_info;       //商户门店信息

        public String getPayer_client_ip() {
            return payer_client_ip;
        }

        public void setPayer_client_ip(String payer_client_ip) {
            this.payer_client_ip = payer_client_ip;
        }

        public String getDevice_id() {
            return device_id;
        }

        public void setDevice_id(String device_id) {
            this.device_id = device_id;
        }

        public StoreInfoItem getStore_info() {
            return store_info;
        }

        public void setStore_info(StoreInfoItem store_info) {
            this.store_info = store_info;
        }
    }

    public static class StoreInfoItem implements Serializable {

        private static final long serialVersionUID = 1L;

        private String id;  //商户侧门店编号，必须
        private String name;    //门店名称
        private String area_code;   //地区编码
        private String address;     //详细地址

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getArea_code() {
            return area_code;
        }

        public void setArea_code(String area_code) {
            this.area_code = area_code;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }
    }

    public static class SettleInfoItem implements Serializable {

        private static final long serialVersionUID = 1L;

        public Boolean profit_sharing;      //是否指定分账

        public Boolean getProfit_sharing() {
            return profit_sharing;
        }

        public void setProfit_sharing(Boolean profit_sharing) {
            this.profit_sharing = profit_sharing;
        }
    }
}
